<div class="h-24 b-d-b-c-ccc g-d-w l-h-24">
    <span class="p-l-8 f-w-b">{{if isset($privilege)}}Privilege edit{{else}}Add new privilege{{/if}}</span>
</div>
<div class="grid_8 p-t-20 p-l-20 ">
    <form id="apri_frm" name="apri_frm" action="{{"widgets/ei"|base_url}}" method="POST" 
          onsubmit="return false;" 
          target="integration_asynchronous" autocomplete="off" 
          >
        <!--      title      -->
        <div class="p-r p-b-12">
            <p>Name</p>
            <div class="p-r">
                <input 
                    type="text"
                    class="w-320 b-g-c-w validate[required]" 
                    value="{{$privilege->apri_name|default:''}}" 
                    minlength="10"
                    maxlength="120" 
                    id="pri_name" name="pri_name"
                    />
                <input 
                    type="hidden" 
                    value="{{$privilege->apri_id|default:''}}" 
                    id="pri_id" name="pri_id"
                    />
            </div>
        </div>
        <div class="clear"></div>
        <!--      alias      -->
        <div class="p-r p-b-12">
            <p><label class="d-p-b w-i" for="pri_key">Keyword</label></p>
            <div class="p-r">
                <input 
                    type="text" 
                    class="w-i b-g-c-w validate[required,custom[alias]]" 
                    value="{{$privilege->apri_key|default:''}}" 
                    minlength="10"
                    maxlength="120" 
                    id="pri_key" name="pri_key"
                    />
            </div>
        </div>
        <div class="clear"></div>
        <div class="p-r p-b-12 f-l">
            <div class="f-l grid_4">
                <!--      birth      -->
                <div class="p-r-2">
                    <div class="p-r">
                        <p><label class="d-p-b w-i" for="pri_position">Position</label></p>
                        <input 
                            type="text" data-putto="#gr-err-1" 
                            class="w-i b-g-c-w validate[min[0],max[99]]" 
                            value="{{$privilege->apri_position|default:0}}" 
                            minlength="7" min="0" max="99"
                            maxlength="20" 
                            id="pri_position" name="pri_position"
                            />
                    </div>
                </div>
            </div>
            <div class="f-l grid_4">
                <!--      year      -->
                <div class="p-l-2">
                    <div class="p-r">
                        <p><label class="d-p-b w-i" for="pri_status">Status{{$privilege->apri_status}}</label></p>
                        <div class="p-r">
                            <select id="pri_status" name="pri_status" class="w-i">
                                <option {{if $privilege->apri_status|default:'false'=='false'}}selected='1'{{/if}} value="false">Private</option>
                                <option {{if $privilege->apri_status|default:'false'=='true'}}selected='1'{{/if}} value="true">Public</option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            <div class="clear"></div>
            <p id="gr-err-1" class="erb"></p>
        </div>
        <div class="clear"></div>
        <!--      alias      -->
        <div class="p-r p-b-12">
            <p><label class="d-p-b w-i" for="pri_desc">Description</label></p>
            <div class="p-r">
                <textarea 
                    class="w-i b-g-c-w input" 
                    id="pri_desc" name="pri_desc"
                    >{{$privilege->apri_description|default:''}}</textarea>
            </div>
        </div>
        <div class="clear"></div>
        <div class="p-r">
            <div id="step-3-back" onclick="reset_pri()" class="b-t-c g-d-w f-l m-r-8">new</div>
            <div id="step-3-next" onclick="update_pri()" class="b-t-c g-d-w f-r">Save</div>
            <div class="clear"></div>
        </div>
    </form>
    <div class="clear"></div>
</div>